<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/templates/template_admin.xhtml">
        <ui:define name="content">
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
                            <h1><h:outputText value="List Applicant"/></h1>
                            <p:dataTable id="dataTable" value="#{hrmb.listapp()}" var="app" paginator="true" rows="5"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="3,5,10,15">         
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="FirstName"/>
                                    </f:facet>
                                    <h:outputText value="#{app.firstName}"/>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="LastName"/>
                                    </f:facet>
                                    <h:outputText value="#{app.lastName}"/>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Gender"/>
                                    </f:facet>
                                    <h:selectOneMenu id="gender"
                                                 value="#{app.gender}"
                                                 styleClass="text-input medium-input">
                                    <f:selectItem itemLabel="Male" itemValue="#{true}"/>
                                    <f:selectItem itemLabel="Female" itemValue="#{false}" />
                                </h:selectOneMenu>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Dob"/>
                                    </f:facet>
                                    <h:outputText value="#{app.dob}">
                                        <f:convertDateTime pattern="MM/dd/yyyy" />
                                    </h:outputText>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="PhoneNumber"/>
                                    </f:facet>
                                    <h:outputText value="#{app.phoneNumber}"/>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Email"/>
                                    </f:facet>
                                    <h:outputText value="#{app.email}"/>
                                </p:column>
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Address"/>
                                    </f:facet>
                                    <h:outputText value="#{app.address}"/>
                                </p:column>                
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="CreatedDate"/>
                                    </f:facet>
                                    <h:outputText value="#{app.createdDate}">
                                        <f:convertDateTime pattern="MM/dd/yyyy" />
                                    </h:outputText>
                                </p:column>         
                                <p:column>
                                    <f:facet name="header">
                                        <h:outputText value="Action"/>
                                    </f:facet>
                                    <h:commandLink value="View" action="#{hrmb.appView(app)}"/><br/>
                                    <h:commandLink value="Edit" action="#{hrmb.appEdit(app)}"/><br/>
                                   
                                </p:column>
                            </p:dataTable>
                            <p:commandButton action="CreateApp" value="New Create"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
